let mongoose = require("mongoose");
mongoose.connect("mongodb://localhost:27017/newQY",{
    useNewUrlParser:true,
    useUnifiedTopology:true
}).then(()=>{
    console.log("异常捕获 - 集合连接成功！");
}).catch(()=>{
    console.log("异常捕获 - 集合连接失败！");
})

let schema = mongoose.Schema;
let errorList = new schema({
    errorType:{
        type:String
    },
    errorMessage:{
        type:String
    },
    errorRow:{
        type:String
    },
    errorCol:{
        type:String
    },
    errorCreateTime:{
        type:String
    },
    errorDetails:[
        {
            type:String
        }
    ],
})

let error = mongoose.model("errorlist",errorList);

module.exports = {
    error
}